package com.codejoys.service;

public class DailyServiceImpl implements DailyService {
    public void findAll() {
//        long start = System.currentTimeMillis();

        //原有对象的方法被调用
        System.out.println("DailyServiceImpl.findAll()");

        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

//        long end = System.currentTimeMillis();
//
//        System.out.println("耗时："+(end-start));

    }

    public void findById(Long id) {
//        long start = System.currentTimeMillis();
        System.out.println("DailyServiceImpl.findById()" + id);
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

//        long end = System.currentTimeMillis();
//
//        System.out.println("耗时："+(end-start));
    }
}
